home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…rary 5 (Internal Edition) / Apple R&P Lib Internal v5.0.iso / 6-Developer Demos / Developer Demos-Ed. / Math CAD Demo / MathCAD Demonstration < prev    next >
Text File  |  1990-02-02  |  13KB  |  516 lines

  1. .MCD 30002 0
  2. .CMD PLOTFORMAT logs=0,0 subdivs=1,1 size=5,15 type=l
  3. .CMD FORMAT  rd=d ct=10 im=i et=3 zt=15 pr=3 mass length time charge
  4. .CMD SET ORIGIN 0
  5. .CMD SET TOL 0.001000
  6. .CMD MARGIN 0
  7. .CMD LINELENGTH 68
  8. .CMD SET PRNCOLWIDTH 8
  9. .CMD SET PRNPRECISION 4
  10. .TXT 1 13 3 45 
  11. a1,45,45,19
  12. Welcome to MathCAD
  13. .EQN 0 102 1 12 
  14. i:0;6
  15. .EQN 0 14 1 12 
  16. j:0;6
  17. .EQN 2 -15 3 29 
  18. m[(i,j):(i-3)^2-(j-3)^2
  19. .TXT 1 -107 3 59 
  20. a1,59,59,121
  21. The Software Tool for Calculating Minds                                                                                 
  22. .EQN 4 2 13 48 
  23. m{48 20 0 50 28 12 45 1 1 1 5}{57}
  24. .TXT 13 -7 2 64 
  25. a1,64,64,70
  26. *Scroll through this document to see more of MathCAD's capabilities.*
  27. .TXT 11 0 2 28 
  28. a1,28,28,17
  29. What is MathCAD?
  30. .TXT 2 0 4 66 
  31. a3,66,66,193
  32. MathCAD is a numerical analysis tool that combines math, text and
  33. graphics in a single, live document. This file will show you some 
  34. of MathCAD's capabilites which you can later try yourself.
  35. .TXT 5 0 3 25 
  36. a2,25,25,39
  37. For example,
  38. Define a range variable:
  39. .EQN 1 25 1 13 
  40. x:-5;5
  41. .EQN 2 0 2 17 
  42. f(x):x^2-10
  43. .EQN 0 20 3 17 
  44. g(x):x"f(x)
  45. .TXT 1 -45 2 22 
  46. a1,22,22,22
  47. Define two functions:
  48. .TXT 3 0 2 29 
  49. a2,29,29,34
  50. Display the functions in a 
  51. plot:
  52. .EQN 0 29 7 34 
  53. &-20&f(x),g(x){1,1,6,22,ll}@&&x
  54. .TXT 3 -29 3 25 
  55. a2,25,25,46
  56. And document your work 
  57. with text, like this.
  58. .TXT 4 0 2 66 
  59. a1,66,66,33
  60. *Continue scrolling to see more*
  61. .TXT 3 0 2 65 
  62. a1,65,65,21
  63. Simple Calculations:
  64. .TXT 3 0 3 65 
  65. a3,65,65,132
  66. MathCAD equations are easy to create.  To enter simple 
  67. mathematical expressions, just type the appropriate numbers and 
  68. operators.
  69. .EQN 4 37 3 24 
  70. 2-4/9.6*3^0.7=?
  71. .TXT 1 -37 2 37 
  72. a2,37,37,40
  73. For example, to create the 
  74. expression:
  75. .TXT 3 3 3 36 
  76. a2,36,36,66
  77.  1.  Click in the empty space below 
  78.  2.  Type 2-4/9.6*3^0.7=   
  79. .TXT 4 25 11 35 
  80. a7,35,35,233
  81. Note, if you make a mistake as you 
  82. enter the equation, hold down the  
  83. shift  key and click in the region 
  84. to select it.  This will place a 
  85. black box around the equation.  
  86. Now press delete to erase the 
  87. expression and try again. 
  88. .TXT 14 -28 2 66 
  89. a1,66,66,53
  90. MathCAD formats all equations in real math notation.
  91. .TXT 3 0 4 60 
  92. a3,60,60,157
  93. It is not necessary to remember keystrokes to enter 
  94. equations.  MathCAD provides two palettes which contain 
  95. most MathCAD operators and Greek characters.  
  96. .TXT 5 0 6 65 
  97. a5,65,65,288
  98. To view the operator palette simply choose Operators from the 
  99. Math menu.   To close the palette, click in the box in the upper 
  100. left corner of the palette.  Move the palette by pressing on the 
  101. mouse button at the top of the palette and dragging the palette 
  102. to the desired position.  .
  103. .EQN 7 39 2 14 
  104. \3=?
  105. .TXT 1 -39 2 38 
  106. a2,38,38,40
  107. Use the operator palette to 
  108. calculate:
  109. .TXT 2 4 6 62 
  110. a4,62,62,153
  111. 1.  Click in the space below
  112. 2.  Select the square root operator from the Operator palette
  113. 3.  Type 3 in the placeholder
  114. 4.  Type = to see the result
  115. .TXT 12 -4 2 65 
  116. a1,65,65,27
  117. Calculating with Variables
  118. .TXT 2 0 2 65 
  119. a2,65,65,70
  120. To make documents more flexible, use variables in your 
  121. calculations:
  122. .TXT 3 1 2 24 
  123. a1,24,24,13
  124. For example:
  125. .EQN 2 3 1 8 
  126. x:6
  127. .EQN 2 0 2 21 
  128. x^2+3*x-5=?
  129. .TXT 4 -4 2 67 
  130. a1,67,67,57
  131. To do some "what-if" analysis with the expression above:
  132. .TXT 2 5 6 61 
  133. a4,61,61,152
  134. 1.  Double click on the 6 to the right of the x:=
  135. 2.  Press delete
  136. 3.  Enter a new value for x
  137. 4.  Click outside of the expression to see the result
  138. .TXT 6 -5 2 65 
  139. a2,65,65,68
  140. Notice how MathCAD automatically updated the effected 
  141. calculation.
  142. .TXT 3 0 2 65 
  143. a1,65,65,24
  144. To define a variable y:
  145. .TXT 2 3 3 63 
  146. a2,63,63,43
  147. 1.  Click in the space below
  148. 2.  Type y:5
  149. .TXT 8 -3 2 66 
  150. a2,66,66,74
  151. Now you can use the variable y in all your calculations in the 
  152. document.
  153. .EQN 3 42 2 19 
  154. y^2+3*y-9=
  155. .TXT 1 -42 2 38 
  156. a2,38,38,45
  157. Use the definition of y above to 
  158. calculate:
  159. .TXT 3 3 4 63 
  160. a3,63,63,105
  161. 1.  Click in the space below
  162. 2.  Type y^2+3*y-9=
  163. 3.  Click outside of the expression to see the result
  164. .TXT 12 -3 3 66 
  165. a3,66,66,92
  166. You can edit the value of y and MathCAD will update the 
  167. expression
  168. to reflect the change.
  169. .TXT 4 0 2 64 
  170. a1,64,64,21
  171. Units and Dimensions
  172. .TXT 2 0 3 60 
  173. a3,60,60,127
  174. With MathCAD, units can be included in calculations and 
  175. MathCAD will automatically perform unit conversion and 
  176. conservation.
  177. .TXT 4 0 2 64 
  178. a1,64,64,39
  179. For example, define a system of units:
  180. .EQN 3 4 1 10 
  181. cm:1L
  182. .EQN 0 17 1 11 
  183. sec:1T
  184. .EQN 2 -17 1 13 
  185. m:100*cm
  186. .EQN 0 17 1 15 
  187. min:60*sec
  188. .EQN 2 -17 1 14 
  189. km:1000*m
  190. .EQN 0 17 1 14 
  191. hr:60*min
  192. .EQN 2 -17 1 16 
  193. in:2.518*cm
  194. .EQN 0 17 1 14 
  195. day:24*hr
  196. .EQN 2 -17 1 13 
  197. ft:12*in
  198. .EQN 0 17 1 20 
  199. year:365.25*day
  200. .EQN 2 -17 1 15 
  201. mi:5280*ft
  202. .TXT 4 -4 2 64 
  203. a1,64,64,46
  204. Now calculate the velocity of a speeding car.
  205. .EQN 4 4 3 23 
  206. (160*mi)/(1*hr)=?m/sec
  207. .EQN 5 1 3 21 
  208. (55*mi)/(1*hr)=?km/min
  209. .TXT 5 -5 2 63 
  210. a2,63,63,71
  211. By changing the units, MathCAD will automatically adjust the 
  212. results.
  213. .TXT 2 0 3 63 
  214. a2,63,63,112
  215. For example, change km in the equation for the velocity of a 
  216. speeding car above to in, and watch what happens.
  217. .TXT 3 4 6 62 
  218. a4,62,62,126
  219. 1.  Double click on the km 
  220. 2.  Press Delete to erase it
  221. 3.  Type in 
  222. 4.  Click outside of the equation to see the result.
  223. .TXT 7 -4 2 66 
  224. a1,66,66,42
  225. MathCAD converts the units automatically.
  226. .TXT 3 0 2 67 
  227. a1,67,67,16
  228. Range Variables
  229. .TXT 2 0 3 61 
  230. a2,61,61,122
  231. In addition to defining variables as single values or units, 
  232. MathCAD variables can be defined to have multiple values.  
  233. .TXT 5 0 2 66 
  234. a1,66,66,13
  235. For example:
  236. .EQN 2 4 1 12 
  237. i:0;5
  238. .EQN 2 6 8 10 
  239. i^2+3*i=
  240. .EQN 0 14 8 9 
  241. \i=
  242. .EQN 1 -22 7 5 
  243. i=
  244. .EQN 0 34 7 11 
  245. ln(i+1)=
  246. .TXT 11 -36 6 66 
  247. a4,66,66,87
  248. To create a range variable j:
  249. 
  250. 1.   Click in the space below    
  251. 2.   Type j:0;5   
  252. .TXT 9 0 3 64 
  253. a2,64,64,84
  254. MathCAD will automatically use an increment value of 1 unless 
  255. otherwise specified.
  256. .TXT 4 0 2 65 
  257. a1,65,65,59
  258. Use the range variable j to do the following calculations:
  259. .TXT 2 1 7 65 
  260. a5,65,65,192
  261. 1.  Click in the space below
  262. 2.  Type j=
  263. 3.  Click in a free place below and type j^2=
  264. 4.  Click in a free place below and type j^3=
  265. 5.  Click outside of the expression to see the results
  266. .TXT 19 -1 2 64 
  267. a1,64,64,56
  268. MathCAD displays the results in output tables or plots.
  269. .TXT 3 0 2 67 
  270. a1,67,67,23
  271. 2-Dimensional Plotting
  272. .TXT 2 0 3 60 
  273. a2,60,60,96
  274. MathCAD will display arrays in tables like those shown 
  275. above, or in graphs like the one below.
  276. .EQN 4 9 7 20 
  277. &&i^2{1,1,6,15,l}@&&i
  278. .TXT 10 -9 2 66 
  279. a1,66,66,23
  280. To create a 2-D graph:
  281. .TXT 2 4 10 60 
  282. a7,60,60,325
  283. 1.  Click near the top of the blank space below to allow 
  284. enough room to create a graph
  285. 2.  Create a plot region by selecting Create Graph 
  286.  from the Plot menu.
  287. 3.  Type i in the center placeholder of the x-axis 
  288. 4.  Type i^2 in the center placeholder of the y-axis
  289. 5.  Click outside of the plot region to view the plot
  290. .TXT 22 -4 3 63 
  291. a3,63,63,136
  292. Note that MathCAD determines the upper and lower limits for 
  293. each axis of the plot.  It is also possible to manually scale 
  294. the limits.
  295. .TXT 4 0 6 57 
  296. a4,57,57,210
  297. With MathCAD you can format plots to add subdivisions, 
  298. change from a linear to a logarithmic scale and change 
  299. the line type.  The plot below was created by choosing 
  300. the Local Plot Format from the Plot menu.
  301. .EQN 8 4 10 36 
  302. &&e^i{-63,1,9,30,X}@&&i
  303. .TXT 14 -4 2 65 
  304. a1,65,65,14
  305. Text Regions 
  306. .TXT 2 0 3 63 
  307. a2,63,63,110
  308. All MathCAD calculations can be documented with text, making 
  309. it  easy to explain equations and label graphs.
  310. .TXT 4 4 6 29 
  311. a4,29,29,110
  312. MathCAD text regions can 
  313. have varying widths, and may 
  314. contain text with different 
  315. fonts, styles and sizes.
  316. .TXT 0 31 7 29 
  317. a4,29,29,110
  318. MathCAD text regions can 
  319. have varying widths, and may 
  320. contain text with different 
  321. fonts, styles and sizes.
  322. .TXT 9 -35 2 57 
  323. a1,57,57,26
  324. To enter text in MathCAD:
  325. .TXT 2 1 6 53 
  326. a4,53,53,150
  327. 1.  Click in the space below
  328. 2.  Create a text region by  selecting Create Text 
  329. Region from the Text menu.
  330. 3. Type This is a MathCAD text region. 
  331. .TXT 15 -1 2 66 
  332. a1,66,66,24
  333. Functions and Operators
  334. .TXT 2 0 2 66 
  335. a1,66,66,64
  336. MathCAD has a wide variety of operators and functions built-in.
  337. .EQN 1 116 3 15 
  338. v:({3,1}ˆ6ˆ4.4ˆ9.3882)
  339. .TXT 1 -113 2 15 
  340. a1,15,15,14
  341. Trigonometric
  342. .TXT 0 21 2 42 
  343. a1,42,42,12
  344. Statistical
  345. .EQN 2 -21 3 14 
  346. sin(„/2)=?
  347. .EQN 1 20 1 19 
  348. mean(v)=?
  349. .TXT 7 -20 2 13 
  350. a1,13,13,8
  351. Complex
  352. .TXT 0 21 2 12 
  353. a1,12,12,10
  354. Calculus 
  355. .EQN 2 -21 2 21 
  356. (3+4i)]=?
  357. .EQN 0 20 3 33 
  358. (0&100`x^2+3*x&x)=?
  359. .TXT 5 -23 7 66 
  360. a5,66,66,279
  361. MathCAD provides built-in functions for everyone, from Fast 
  362. Fourier Transforms for the engineer, to interpolation functions 
  363. for the statistician, to trig functions for the geometry student.  
  364. See the MathCAD Macintosh brochure for a complete list of 
  365. functions and operators.
  366. .TXT 8 0 2 65 
  367. a1,65,65,21
  368. Vectors and Matrices
  369. .TXT 2 0 4 62 
  370. a3,62,62,147
  371. Matrices can be created by specifying each element 
  372. individually, through iterative calculations, or by importing 
  373. values from an ASCII data file.
  374. .TXT 6 3 2 63 
  375. a1,63,63,19
  376. Define a matrix m:
  377. .EQN 3 2 5 26 
  378. m:({3,3}ˆ4ˆ\5ˆ-1.3ˆ0ˆ8ˆ3.001ˆ.81^2ˆ2.95ˆ1)
  379. .TXT 6 -2 2 63 
  380. a1,63,63,49
  381. Apply vector and matrix operators and functions:
  382. .EQN 4 1 1 15 
  383. |m=?
  384. .EQN 2 0 3 34 
  385. m^-1=?
  386. .EQN 5 0 2 11 
  387. v:m{52}
  388. .EQN 1 26 1 17 
  389. var(v)=?
  390. .EQN 2 -26 3 18 
  391. m*v=?
  392. .EQN 1 26 1 19 
  393. stdev(v)=?
  394. .TXT 3 -30 2 64 
  395. a1,64,64,44
  396. Create a 3 by 3 matrix, element by element:
  397. .TXT 3 1 10 60 
  398. a9,60,60,353
  399. 1.  Click in the space below
  400. 2.  Type matrix:
  401. 3.  Select Create-Edit Matrix from the Math menu
  402. 4.  Click on the OK to create a 3x3 matrix (the default 
  403. matrix)
  404. 5.  Enter values in the placeholders provided by clicking 
  405. on each placeholder, or pressing the tab key to move from 
  406. placeholder to placeholder, and enter values for the matrix 
  407. elements.
  408. .TXT 23 -1 2 62 
  409. a2,62,62,67
  410. MathCAD matrices can also be created with iterative 
  411. calculations.
  412. .TXT 3 3 2 63 
  413. a1,63,63,13
  414. For example:
  415. .EQN 3 0 1 12 
  416. i:0;8
  417. .EQN 0 14 1 12 
  418. j:0;8
  419. .EQN 3 -14 3 22 
  420. m[(i,j):sin((i*j)/8)
  421. .TXT 7 -3 2 39 
  422. a1,39,39,23
  423. 3-Dimensional Plotting
  424. .TXT 4 0 2 61 
  425. a2,61,61,64
  426. The matrix m defined above can now be displayed as a 3-D 
  427. plot.
  428. .EQN 3 3 16 33 
  429. m{10 35 0 60 20 15 30 1 1 1 2}{57}
  430. .TXT 17 -3 6 59 
  431. a4,59,59,198
  432. Surface plots may be rotated and tilted to give a 
  433. different perspective of the matrix.   Surface plots can 
  434. also be formatted to change colors and view the plot by 
  435. elevation rather than lighting.
  436. .EQN 8 1 16 27 
  437. m{59 17 -34 51 20 15 24 1 1 1 4}{57}
  438. .EQN 0 33 16 27 
  439. m{10 35 0 60 20 15 24 1 1 0 6}{57}
  440. .TXT 20 -34 2 64 
  441. a1,64,64,20
  442. And that's not all!
  443. .TXT 2 0 2 64 
  444. a2,64,64,68
  445. Here are some features that have not been displayed in this 
  446. demo: 
  447. .TXT 4 4 2 61 
  448. a1,61,61,30
  449. Simultaneous equation solving
  450. .TXT 2 0 2 62 
  451. a1,62,62,18
  452. Number formatting
  453. .TXT 2 0 2 62 
  454. a1,62,62,45
  455. File compatibility between PC and Macintosh*
  456. .TXT 2 0 2 63 
  457. a1,63,63,36
  458. Support for all Macintosh printers*
  459. .TXT 2 0 2 63 
  460. a1,63,63,18
  461. Complex variables
  462. .TXT 2 0 2 64 
  463. a1,64,64,41
  464. Read and write data from external files*
  465. .TXT 2 0 2 63 
  466. a1,63,63,34
  467. Block cut and paste to clipboard*
  468. .TXT 2 0 2 62 
  469. a1,62,62,31
  470. Support for Math Coprocessors*
  471. .TXT 3 -2 2 64 
  472. a1,64,64,63
  473. (*  available in Macintosh MathCAD, but not on this Demo Disk)
  474. .TXT 3 -2 2 64 
  475. a1,64,64,24
  476. Putting it all together
  477. .TXT 3 3 2 63 
  478. a1,63,63,21
  479. 1.  What is MathCAD?
  480. .TXT 3 4 12 52 
  481. a11,52,52,503
  482. MathCAD is a numerical analysis tool designed to 
  483. let you solve mathematical problems on your 
  484. Macintosh as you would on a scratchpad -- by 
  485. combining math, text and graphics all together.  
  486. But MathCAD is smarter than your piece of paper 
  487. because it will actually do your calculations for 
  488. you.  And unlike a standard piece of note paper 
  489. which can only be reused until you erase a hole in 
  490. the paper, a MathCAD document can be used again and 
  491. again to allow for "what-if" analysis like never 
  492. before.
  493. .TXT 14 -5 2 65 
  494. a1,65,65,29
  495. 2.  Where can I buy MathCAD?
  496. .TXT 2 4 10 60 
  497. a7,60,60,153
  498. Contact us to purchase or to find the dealer nearest you:
  499. MathSoft Inc.
  500. 201 Broadway
  501. Cambridge, MA 02139
  502. 
  503. 1-800-MATHCAD 
  504. or 617-577-1017 inside MA
  505. .TXT 13 -4 2 63 
  506. a1,63,63,39
  507. 3.  What else can I do with this demo?
  508. .TXT 3 3 8 58 
  509. a6,58,58,334
  510. Now that you have reached the end of this document you may 
  511. close it by selecting Close from the File menu and open a new 
  512. file to create your own document.  Note that this demonstration 
  513. version of MathCAD will not allow you to save or print 
  514. documents.  You may also open some other sample MathCAD 
  515. documents included on this disk.
  516.